home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr25
/
oscpy250.zip
/
OSCOPY.DOC
< prev
next >
Wrap
Text File
|
1993-06-22
|
25KB
|
493 lines
SCOPY for OS/2
DISKETTE to FILE / FILE to DISKETTE / FILE TO FILE
COPY and ARCHIVE UTILITY
Written by
Craig Gaumer
and
Ed Bachman
For
C.E.Gaumer Software
P.O. Box 383
Laurys Station, PA 18059-0383
Copyright (C) 1990,1991,1993 All Rights Reserved
DISCLAIMER
It is the sole resposibility of the user to determine the
suitability and fitness of SCOPY for the user's particular needs, uses
and hardware. C.E. Gaumer Software assumes no responsibility for any
difficulties, problems or loss of data resulting from the use of SCOPY,
even if C.E. Gaumer Software has been informed of the possibility of
such difficulties, problems or losses.
Purpose: SCOPY is a full featured Diskette Archiver. SCOPY will
create a file which contains the necessary data to create
an exact duplicate of the original diskette. SCOPY can
compress this file and include a user specified remark
for reference. When creating the diskette SCOPY can
format the diskette and write the information to it in
one pass. The diskette created by SCOPY is an exact
duplicate of the original. In addition SCOPY can create
an OS/2 "DOS image" file identical to that created by the
VMDISK utility supplied with OS/2. It can also recreate
a diskette from an image file. To our knowledge no other
utility provides this function.
History: SCOPY was originally created as a DOS program and was
first released in 1990. Compression, CRC checking and
other enhancements were added as the product matured.
The files created by the OS/2 version are completely
compatible with the DOS version. The 32 bit OS/2
version, however, is NOT the DOS version of SCOPY ported
to OS/2. The OS/2 version was written from scratch with
full support for multi-threading and the OS/2 2.x 32 bit
API.
Use: SCOPY has four basic modes of operation. It can copy
from a diskette to a file, from a file to a diskette,
from one file to another, or can provide information
about and/or verification of a single file. The proper
mode is automatically selected by SCOPY based on the
source and destination specified.
Quick
Start: SCOPY will perform its function quite well with no
command line switches. Creating a SCOPY file called
MYFILE.SCP from the diskette in drive A is a simple as:
SCOPY A: MYFILE
To create a new diskette from that file the command is:
SCOPY MYFILE A:
The command line switches provide the user with
additional control and access to extra features but SCOPY
with only the source and destination specified as shown
above will efficiently perform the storage and retrieval
of diskette data.
General
Syntax: For all modes the syntax of the SCOPY command is:
SCOPY <source> <destination> [/switches]
Either the source or destination can be a drive letter
(e.g. A:) while the other is a file, or both can be
files. For information or verification of a single file
the destination is omitted. For further information see
the individual descriptions of Diskette to File, File to
Diskette, File to File, or Single File and switches
below.
File
Names: The files created by SCOPY can have any filename which is
valid on the operating system on which the file will be
used. SCOPY fully supports long filenames under OS/2.
To ensure full compatibility with the DOS version, SCOPY
presently makes no use of Extended Attributes. The
filename can be specified as it would be to an OS/2
command like COPY including the drive and path, if
desired. Wildcards are NOT permitted. If no period
appears in the filename SCOPY adds .SCP to the specified
filename. We suggest that SCOPY files have the '.SCP'
extension since we plan a PM based version that will
allow the user to 'drag and drop' a file onto a SCOPY
icon on the desktop and a common extension will prove
advantageous for OS/2 associations at that time. Upper
and lower case in filenames are preserved by SCOPY.
Spaces in filenames are permitted. As elsewhere in OS/2,
filenames which contain spaces must be enclosed in
quotes. The drive specifier must be a single letter
followed by a colon.
Diskette
to File: To SCOPY a diskette to a file the syntax is:
SCOPY d: destfilename [/switches]
Valid switches are: O I R 0 1 2 C T
File to
Diskette: Syntax is:
SCOPY srcfilename d: [/switches]
Valid switches are: O I N F V R
File to File: Syntax is:
SCOPY srcfilename destfilename [/switches]
Valid switches are: O I R 0 1 2 C
Single File: Syntax is:
SCOPY filename [/switches]
Valid switches are V I R
Switches: When specifying switches they may be listed separately or
together and with or without individual slashes. The
switches are not case or order sensitive. For example
the following switch sequences are all identical:
/o /r /O/R /or /OR /R/o
The following switches are supported:
V VERIFY: Test the integrity of a SCOPY file or
destination diskette. Valid for single file or
file to diskette. Although verification of the CRC
checksum is done automatically during actual
copying, the 'V' switch used with file to diskette
will cause the entire diskette to be read after the
write is finished. SCOPY will then compare this
information to the file data. With a single file
verification of CRC and decompression information
will be performed.
O OVERWRITE: Instructs SCOPY not to prompt the user
if the destination file already exists or if the
diskette contains data. SCOPY will write the
output erasing the previously existing file or
diskette data. If this switch is not specified,
the user will be asked permission to overwrite an
existing file or a diskette which contains data.
R REMARK: Prompt the user for a remark to be embedded
in the destination file. This remark will be
displayed when SCOPY accesses the file for
verification or copying. NOTE: For a file to file
copy the default is to copy the source file REMARK
to the destination file. Using the 'R' switch in a
file to file copy results in the user being
prompted for a remark which will be used in the
destination file in place of the remark in the
source file. In file to disk or a single file
operation this switch causes the remark to be
written to the file SCOPYLBL.TXT in the current
directory. The remark is appended to the file if
the file exists, otherwise the file is created.
This file can then be used as the data for printing
labels. Of course, 'R' is not valid if the
destination of an operation is an image file.
I IMAGE: Indicates to SCOPY that an OS/2 DOS image
file is involved in the operation. An image file
is a bootable file created with the OS/2 VMDISK
command. SCOPY can access these files in the same
way it accesses its own files. Note that the
standard extension for SCOPY is still .SCP, so it
is wise to specify an extension. (or put a period
at the end of the filename if you prefer no
extension) When the 'I' parameter is specified on
an operation involving only one file (any operation
except file to file) SCOPY assumes the file
involved is (or is to be) an image file. For file
to file operations, if the source file is not a
SCOPY file it is assumed to be an image file. If
the source file is a SCOPY file an image file is
created as the destination. If the source file
specified with the I parameter is not an image or a
SCOPY file the result of the operation will be
incorrect. This provides for all possibilities
except image to image copy which can be done
without SCOPY by using the normal OS/2 COPY
command. Although diskettes could be stored in the
image format the SCOPY file format is preferred
since the image file has no verification
information and is not compressed.
0,1,2,C These are the compression level switches. They are
used to specify the method of compression used when
a SCOPY file is being created. When none of these
switches is specified 'smart compression' is used.
Since it is the default, the 'C' switch is really
never needed. Level 1 compression compresses only
empty sectors and is best for diskettes which
contain files which are already compressed. The
'2' switch enables LZ compression on a track by
track basis. The '0' switch causes the file to be
totally uncompressed and is provided only for
compatibility with the original (version 0.x) DOS
SCOPY. The 'C' switch (or no compression switches)
enables 'SMART COMPRESSION' and tests levels 1 and
2 and uses the level which provides the smaller
output file.
N,F These are the diskette formatting switches No
format and Force format. If neither of these
switches is specified SCOPY inspects the target
diskette and formats the diskette if the diskette
is unformatted or if the format differs from that
required by the source file. The 'F' switch causes
SCOPY to format the target diskette even if the
existing format is correct. This switch should be
used if the diskette was formerly the target of a
SCOPY, DISKCOPY or FORMAT command that was aborted
before completion since such a diskette may be only
partially formatted causing SCOPY's format
detection to be confused. The 'N' parameter will
cause the diskette not to be formatted. If 'N' is
specified and the diskette is not formatted SCOPY
will abort. If the format is incorrect SCOPY will
inform the user and present an option to abort or
write the data to the existing format. Note that
if the existing format is equal to or larger than
the required format in number of heads, number of
cylinders and sectors per track the file may be
written to the diskette and the diskette will
function correctly. This is useful for making a
low density diskette for use on a machine with high
density drives since many 1.44Meg diskette drives
do not properly recognize (or may not properly
create) a 3.5" diskette with a 360K or 1.2Meg
format. By formatting the diskette to 1.44Meg and
then writing the lower density data to the diskette
with the 'N' switch the sector spacing and timing
of the higher density is maintained while the
operating system recognizes the lower density and
the diskette will function correctly. Note that no
testing is done by SCOPY to see that the existing
format is larger than the required format and if
the size requirements are not met errors will occur
during the diskette write. (SCOPY will properly
report these errors)
T Test diskette size: This switch instructs SCOPY to
test the physical diskette for heads, cylinders and
sectors per track before reading the diskette data.
Only the following sizes are detected at this time:
2.88Meg, 1.44Meg, 1.2Meg, 720K, 360K, 320K, 180K,
160K. This makes it possible to SCOPY diskettes
with an invalid or non standard boot sector (1.44
Meg UNIX and Macintosh diskettes, RISC6000
diskettes, normal diskettes with bad boot sectors
and probably others) It is recommended that /F is
used to format the target diskette when writing
these files back to diskette. Note that while the
feature to read non-standard diskettes is not
currently available in the DOS version of SCOPY the
DOS versions can create diskettes from these files.
Prompts: Various user prompts are presented to the user when SCOPY
encounters situations where additional information is
required. Of course the user is prompted for a REMARK
when /R is supplied and a SCOPY file is being created.
This prompt is always presented before any others so that
the REMARK can be redirected from the command line or
from a REXX procedure. If the /O switch is not
specified and the destination file exists or the
destination diskette contains files the user is asked
permission to overwrite the target. In the case of a
diskette, selecting "d" will display a listing of the
first ten entries in the root directory of the diskette
and again request permission to overwrite. When /N is
specified and the diskette format does not match that
required by the source file the user is asked if the
diskette data should be written anyway. See the 'N' and
'F' switch description above for more information on
writing to an unmatched diskette without format.
Problems: No one likes bugs, however in a program as complex as
SCOPY they are bound to exist. No known bugs currently
exist in SCOPY. The 2.88 Meg diskette functions have not
been tested since we have no access to a 2.88 Meg drive.
The information for 2.88 Meg diskettes has been gathered
from reliable sources and should function correctly. We
would appreciate any feedback on how well (or how poorly)
SCOPY works with 2.88 Meg diskette drives. Any reports
of any problems with any part of SCOPY will be greatly
appreciated. Bug reports are accepted from anyone,
registered or not, no questions asked. REPORT THE
BUGS... THEY WILL GET FIXED!
Address correspondence to:
C.E.Gaumer Software
P.O. Box 383
Laurys Station, PA 18059-0383
Registration:
SCOPY is NOT public domain software. It is copyrighted
software and all rights are reserved by C.E.Gaumer
Software. SCOPY is distributed as shareware which means:
You are granted permission to use the software for
personal use for a trial period of 30 days. Continued
use beyond the trial period by a private individual or
ANY use in a business, institutional or governmental
agency requires registration. Single user registration
is $20.00 U.S. for either the DOS or OS/2 verion or
$25.00 for both. Contact the author at the address above
for site license or volume pricing. See the file
REGISTER.FRM for a registration form or send payment in
U.S. funds to the address above including your address,
preferred diskette format, which operating system you use
and the version and release date of SCOPY you are
currently using. (Displayed when SCOPY is run)
Registration includes a printed manual and the latest
version of SCOPY. (Pennsylvania residents must add 6%
sales tax)
Technical Information:
SCOPY was written in C and compiled with IBM C Set/2.
It takes full advantage of OS/2 2.x multi-threading
capabilities and 32-bit API. At some time during the
execution of SCOPY as many as five threads can be in
operation. As strange as it seems, multi-threading is
not always the best solution to a given situation. For
instance, SCOPY does not write data to the SCOPY file
while it performs other functions. Although it easily
could (and during testing early unreleased versions did)
we found that the few seconds it takes to write the file
after other processing is complete is a small price to
pay for having the hard drive totally available to other
processes when SCOPY is switched to the background.
Writing the file after other processing is complete also
tremendously speeds up execution when the source is a
diskette and the destination SCOPY file is on another
diskette drive. (maybe some day someone will actually
need to write the SCOPY file directly to diskette).
We have noted that OS/2 doesn't seem to like
accessing both floppy drives simultaneously if one of
them is involved in a format operation.
We have also used SCOPY as a data recovery tool. By
using SCOPY to read a diskette with a defective sector
and then writing the data back to a good diskette, read
errors which stop many programs will be eliminated.
While the data from the defective sector will be replaced
with zeros, in many cases the original program can read
the file with the loss of a small amount of data instead
of the loss of the entire file.
One of the main criteria during the development of
SCOPY for OS/2 was complete compatibility of files with
the DOS version. At the present time the DOS and OS/2
version data files are 100% compatible, except that the
DOS version does not support 2.88Meg diskettes. SCOPY
files written by SCOPY for DOS can be read by SCOPY for
OS/2 and vice versa. Since the DOS version presently has
no '/T' switch it cannot read UNIX or MAC diskettes,
however, the DOS version can write UNIX or MAC diskettes
from SCOPY files created with the OS/2 version of SCOPY.
It should be noted that earlier releases of the DOS
version (through 2.02) had a severe speed problem writing
diskettes on some 386 and 486 systems. This problem does
not affect the OS/2 version. A new version of the DOS
SCOPY is being released at this time to overcome the
speed problem mentioned above. The new DOS version is
2.03. Because of the limits of the operating system, the
error checking and available features in the DOS version
will never reach the level of the OS/2 version.
Note that diskettes created with SCOPY are EXACT
duplicates of the original diskette. DISKCOPY from DOS
4.0 and above, OS/2 DOS and OS/2 does not make an exact
copy of the original diskette. DISKCOPY assigns a new
volume serial number to the new diskette. DISKCOMP
ignores the serial number during its compare. This means
that that two diskettes that compare as identical with
DISKCOMP may create SCOPY files that do not match. Also,
since information about the SCOPY program that created a
SCOPY file is included in the SCOPY file header for
reference, SCOPY files created by different versions of
SCOPY from the same diskette will show mismatches if the
files are compared.
We suggest using the /V switch when creating
diskettes. Although this takes longer, we have
experienced a few cases where SCOPY did not report errors
during the diskette write that were discovered during the
diskette verify. When writing to the diskette SCOPY can
only report errors to the user if the errors are reported
to SCOPY by the operating system. On rare occasions the
diskette write returns no error when the sector written
is actually unreadable. These errors will be found by
the verify routines. Also, be aware that SCOPY is a pure
copy of the original diskette at the sector level. This
means that no relocation of data is possible, even if the
target diskette has defective sectors. If the target
diskette has any bad sectors the SCOPY operation will
error.
Registration form for SCOPY
LIMIT OF LIABILITY
SCOPY is distributed as is. The author disclaims all warranties,
expressed or implied. The author will assume no liability for
damages either from the direct use of this product or as a
consequence of the use of this product.
Name: ___________________________________________________
Company: ___________________________________________________
Address: ___________________________________________________
City, State, Zip: ___________________________________________________
Country: ___________________________________________________
Daytime Phone: _________________ Evening Phone: _________________
Signature: ________________________________ Date:_____________
Current Version of Current Version of
OS/2 SCOPY: ______________ DOS SCOPY: ______________
Diskette Size
and Product: 3.5(OS/2)___ 5.25(OS/2)___ 3.5(DOS)___ 5.25(DOS)___
If registering more than five users write for volume discounts!
Number of Individual Users(DOS SCOPY) :________ X $20.00 = $_________
Number of Individual Users(OS/2 SCOPY):________ X $20.00 = $_________
Number of Individual Users(BOTH SCOPY):________ X $25.00 = $_________
Pennsylvania residents add 6% sales Tax $_________
Total Enclosed $_________
Payment must be in U.S. funds payable to: C.E.Gaumer Software
Send to: C.E.Gaumer Software
P.O.Box 383
Laurys Station, PA 18059-0383
*****************BUG REPORT TO:*******************************************
For product defect report and responce please send e-mail to:
John Heater
Private Netmail Fidonet:
1:2607/112
Or on the OS/2 Product Support Echo
at the OS/2 Shareware BBS..